<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>header</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


		<link rel="stylesheet" type="text/css" href="/Machine/css/header.css">
		<script type="text/javascript">
			function Dsearch(){
				if(document.getElementById("destoon_kw").value==""){
					alert("请输入关键字");
					return false;
				}else{
			//		var key = document.getElementById("destoon_kw").value;
			//		key = encodeURI(encodeURI(key));
			//		document.getElementById("destoon_kw").value = key;
				//	alert(document.getElementById("destoon_kw").value);
					return true;
				}		
			}
		</script>
	</head>

	<body>
		<div class="headerPage">

			<div class="f_l logo">

				<a href="/Machine/index.jsp"> <img alt="机械零件交易平台"
						src="/Machine/images/logo.png"
						height="35px" width="200px" border="0px" > </a>

			</div>


			<form id="destoon_search" action="/Machine/search/keySearch.action" method="post" onsubmit="return Dsearch();" >

				<div class="f_l head_search">

					<div>
						<input name="keywords" id="destoon_kw" type="text" class="search_i"
							value="" onfocus="if(this.value=='请输入关键词') this.value='';"/>
						<input type="hidden" name="orderKey" value="first"/>
						
						<input name="submit" type="submit" class="search_s" value="" />
					</div>

				</div>
			</form>

			<div id="destoon_member" class="f_r">
				<div class="welcome_div">
				<c:if test="${sessionScope.username != null}">欢迎${sessionScope.username}
				
				<a href="/Machine/user/logout.action">	退出登录	</a>
				<a href="/Machine/provider_member.jsp">	&nbsp;&nbsp;用户管理	</a>
				</c:if>
				
				</div>
				
				<div class="register_div">
				<c:if test="${sessionScope.username == null}">
				<a href="/Machine/register.jsp" target="_blank">免费注册</a> | <a href="/Machine/login.jsp" >会员登录</a>
				
				</c:if>
				
				</div>
			</div>

		</div>

	</body>
</html>
